<?php

namespace App\EloquentORM;

use Encore\Admin\Traits\AdminBuilder;
use Encore\Admin\Traits\ModelTree;
use Illuminate\Database\Eloquent\Model;

/**
 * @method static pluck( string $string , string $string1 )
 * @method static value( string $string )
 */
class Category extends Model
{
    protected $table = 'category';
    //
	
	use AdminBuilder, ModelTree {
		ModelTree::boot as treeBoot;
	}
	
	public function __construct(array $attributes = [])
	{
		parent::__construct($attributes);
		
		$this->setParentColumn('parent_id');
		$this->setOrderColumn('order');
		$this->setTitleColumn('name');
	}

    public static function getAll()
    {
        return self::all ()->toArray ();
    }
}
